package com.jinke.api.modules.ums.controller;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps;
import com.jinke.api.common.api.CommonPage;
import com.jinke.api.common.api.CommonResult;
import com.jinke.api.modules.app.enums.ChannelStatus;
import com.jinke.api.modules.app.model.SysMessage;
import com.jinke.api.modules.app.request.AdminMessageQueryRequest;
import com.jinke.api.modules.app.request.UserChannelPageRequest;
import com.jinke.api.modules.ums.model.Channel;
import com.jinke.api.modules.ums.model.UmsAdmin;
import com.jinke.api.modules.ums.model.UserChannel;
import com.jinke.api.modules.ums.model.UserChannelPageVO;
import com.jinke.api.modules.ums.service.ChannelCarrierService;
import com.jinke.api.modules.ums.service.ChannelService;
import com.jinke.api.modules.ums.service.UmsAdminService;
import com.jinke.api.modules.ums.service.UserChannelService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.apache.commons.compress.utils.Lists;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @projectName:
 * @title: UserChannelController
 * @description: 用户渠道view
 * @see:
 * @author: hhp
 * @version: 1.0.0
 * @createTime: 2024/8/21 10:17
 */
@RestController
@RequestMapping("/admin/userChannel")
@RequiredArgsConstructor
public class UserChannelController {
    private final UserChannelService userChannelService;

    @ApiOperation("用户渠道列表")
    @GetMapping("/list")
    @ResponseBody
    public CommonResult<CommonPage<UserChannelPageVO>> list(UserChannelPageRequest request) {
        return userChannelService.pageList(request);
    }
}
